<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    <title>第十八课 ajax</title>
</head> 
<body>
    <script>
        var xhr = new XMLHttpRequest();
        var url = 'http://localhost:3000/tearcher';
        xhr.open('GET',url,true);
        xhr.onreadystatechange = function(){
            if(xhr.readyState == 4){
                if(xhr.status == 200){
                    console.log(xhr.responseText);
                }
            }
        }
        xhr.send();
    </script>                  
</body> 
</html>